<template>
	<view class="content">
		<view class="myService">
			<view class="service">
				<view class="topV">
					<view class="service-title">订单信息</view>
					<view class="status">{{ signed | showType}}</view>
				</view>
				<view class="service-menu">
					<view class="item">
						<view class="labCode">订单号</view>
						<view class="labTime">{{orderCode}}</view>
					</view>
					<view class="item">
						<view class="labCode">下单时间</view>
						<view class="labTime">{{list[0].orderCreateTime}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="item" v-for="(item,index2) in list" :key="index2">
			<view class="topView">
				<view class="Itemleft">
					<view class="ItemNum">
						{{item.deliveryCode}}
					</view>
					<view class="itemType">
						{{item.lastNodeName | showLastNodeName }}
					</view>
				</view>
				<view class="Itemtime">
					{{item.deliveryTime}}
				</view>
			    <view class="arrowRight" @click="btntoDetailClick(item.deliveryCode)">
			    	<uni-icons type="arrowright" size="25" color="#666"></uni-icons>
			    </view>
			</view>
			<view class="bottomView">
				<view class="btnCheck" @click="btnLogisticsClick(index2,item.deliveryCode)">
					查看详情
				</view>
			</view>
			<view class="itemList" v-if="item.showHidden">
				<view class="itemGoods" v-for="(sonItem,sonIndex) in goodsList[index2]" :key="sonIndex">
					<view class="orderGoods">
						<view class="box-thumbnail">
							<image :src="sonItem.pic" mode="aspectFill"></image>
						</view>
						<view class="box-info">
							<view class="box-info__top">
								<view class="box-info__title">
									{{sonItem.goodsName}}
								</view>
								<view class="box-info__total_amount">
									￥{{sonItem.price}}
								</view>
							</view>
							<view class="box-info__bottom">
								<view class="box-info__status">规格  {{sonItem.unit}}</view>
								<view class="box-info__status">x{{sonItem.goodsNum}}</view>
							</view>
						</view>
					</view>
					<view class="btnGView">
						<view class="btnCheck"  @click="btnExchangeClick(sonItem,index2,sonIndex)">
							申请换货
						</view>
						<view class="btnCheck"  @click="btnReturnClick(sonItem,index2,sonIndex)">
							申请退货
						</view>
						
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webStyle: {
					progress: {  
						color: '#009BFF'  
					}  
				},  
				back: false,  
				src: "",  
				orderSerialNum: ""
			}
		},
		onLoad() {
			// setTimeout(()=>{
				
			// 	uni.navigateBack({
			// 		delta:2
			// 	},1200)
				
			// })
		},
		methods: {
			
		}
		
	}
</script>

<style lang="less">
.itemList{
	 padding: 20rpx 20rpx 0;
	 border-top: 1rpx solid #f2f2f2;
	.orderGoods:last-child{
		border-bottom: 1rpx solid #fff;
		margin-bottom: 0upx;
	}
	.orderGoods {
		display: flex;
		flex-direction: row;
		// margin-bottom: 40upx;
		padding-bottom: 40rpx;
		// border-bottom: 1rpx solid #f2f2f2;
		
	
		.box-thumbnail {
			width: 160upx;
			height: 160upx;
			margin-right: 20upx;
	
			image {
				width: 100%;
				height: 100%;
				border-radius: 8px;
				border: 1rpx solid #f2f2f2;
			}
		}
	
		.box-info {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			flex: 1;
			
				
			.box-info__top{
				
				display: flex;
				justify-content: space-between;
				align-items: center;
				color: #333333;
				font-size: 32upx;
				.box-info__title {
					font-weight: 400;
	
				}
				.box-info__total_amount {
					font-weight: 500;
					white-space: nowrap;
					margin-left: 30rpx;
					
				}
				
				
				    
			}
	
	
			.box-info__bottom {
				// margin-top: 10upx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				font-size: 28upx;
				color: #888;
			}
		}
	} 
	.btnGView{
		  
		  height: 80rpx;
		  display: flex;
		  justify-content: space-between;
		  flex-direction: row-reverse;
		  // padding-top: 20rpx;
		  border-bottom: thin solid #f2f2f2;
		  margin-bottom: 20rpx;
		  .btnCheck {
		  
				width: 146upx;
				height: 54upx;
				border-radius: 27upx;
				border: 0.6upx solid #999999;
				font-size: 28upx;
				color: #333;
				line-height: 54rpx;
				text-align: center;
				margin-right: 20upx;
		  
			}
		  
	}
	 
 }
</style>
